package com.ctshk.task.worker.processors;

import com.ctshk.common.dto.Result;
import com.ctshk.rpc.iotc.service.IOperateBankPreferenceService;
import com.ctshk.rpc.iotc.service.IOperatePromotionService;
import com.ctshk.rpc.order.scenic.service.IAirshowOrderService;
import com.github.kfcfans.powerjob.worker.core.processor.ProcessResult;
import com.github.kfcfans.powerjob.worker.core.processor.TaskContext;
import com.github.kfcfans.powerjob.worker.core.processor.sdk.BasicProcessor;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Component;

/**
 * 珠海航展退款查询状态（2分钟一次）
 *
 * @author 周億耀
 * @since 2021-6-18
 */
@Component
public class AirshowOrderRefundProcessor implements BasicProcessor {

    @DubboReference
    private IAirshowOrderService iAirshowOrderService;

    @Override
    public ProcessResult process(TaskContext context) {
        Result result = iAirshowOrderService.autoCheckAPIOrder();
        return new ProcessResult(true, "定时处理珠海航展退款，本次处理退款成功 "+result.getData()+" 个");
    }
}
